function questContainerWithItems( cid, args )
	local containerInfo = getItemDescriptions( args.containerid )
	local container = doCreatePackedContainer( cid, args.containerid, args.items, true )
	
	if container[1] ~= RETURNVALUE_NOERROR then
		doPlayerSendTextMessage( cid, MESSAGE_INFO_DESCR, "You have found " .. containerInfo.article .. " " .. containerInfo.name .. ". You must free a slot in one of your containers, or one of your hands, if you want to get it." )
		return FALSE
	end	
	if( getItemWeight( container[2] ) > getPlayerFreeCap( cid ) and getPlayerAccess(cid) < ACCESS_GAMEMASTER ) then
		doPlayerSendTextMessage( cid, MESSAGE_INFO_DESCR, "You have found " .. containerInfo.article .. " " .. containerInfo.name .. ". It weighs " .. getContainerCap( container ) .. " oz. and it's too heavy for you to carry." )
		doRemoveItem( container, 1 )
		return FALSE
	else
		doPlayerSendTextMessage( cid, MESSAGE_INFO_DESCR, "You have found " .. containerInfo.article .. " " .. containerInfo.name .. "." )
		return TRUE
	end
end

function questAnnihilatorChests(cid, args)
 local reward = doCreateItemEx( args.itemid, args.count )
 local itemdesc = getItemDescriptions( args.itemid )
 local rewardStr = nil
 
 if( args.count > 1 ) then
	rewardStr = args.count .. " " .. itemdesc.plural
 else
	rewardStr = itemdesc.article .. " " .. itemdesc.name
 end
 
 for key,val in pairs( args.other_storages ) do
	if( getPlayerStorageValue( cid, val ) == 1 ) then
		doPlayerSendTextMessage( cid, MESSAGE_INFO_DESCR, "It is empty." )
		return FALSE
	end
 end
 
 if doPlayerAddItemEx( cid, reward ) ~= RETURNVALUE_NOERROR then
	doPlayerSendTextMessage( cid, MESSAGE_INFO_DESCR, "You have found " .. rewardStr .. ".\nYou have to free a place in one of your containers to get it." )
	return FALSE
 else
	if getItemWeight( reward ) > getPlayerFreeCap( cid ) and getPlayerAccess(cid) < ACCESS_GAMEMASTER then
		doPlayerSendTextMessage( cid, MESSAGE_INFO_DESCR, "You have found " .. rewardStr .. ".\nIt weighs " .. getItemWeight( reward ) .. " and it's too heavy for you to carry." )
		doRemoveItem( reward )
		return FALSE
	end
	
	doPlayerSendTextMessage( cid, MESSAGE_INFO_DESCR, "You have found " .. rewardStr .. "." )
 end
 
 return TRUE
end

function questAndTeleport( cid, args )
 local reward = doCreateItemEx( args.itemid, args.count )
 local itemdesc = getItemDescriptions( args.itemid )
 local rewardStr = nil
 
 if( args.count > 1 ) then rewardStr = args.count .. " " .. itemdesc.plural; else rewardStr = itemdesc.article .. " " .. itemdesc.name; end
 
 if doPlayerAddItemEx( cid, reward ) ~= RETURNVALUE_NOERROR then
	doPlayerSendTextMessage( cid, MESSAGE_INFO_DESCR, "You have found " .. rewardStr .. ".\nYou have to free a place in one of your containers to get it." )
	return FALSE
 else
	doPlayerSendTextMessage( cid, MESSAGE_INFO_DESCR, "You have found " .. rewardStr .. ".\nIt weighs " .. getItemWeight( reward ) .. " and it's too heavy for you to carry." )
	doRemoveItem( reward )
	return FALSE
 end
 
 if args.startEffect ~= nil then doSendMagicEffect( getThingPos( cid ), args.startEffect ); end
 doTeleportThing( cid, { x = args.x, y = args.y, z = args.z } )
 if args.endEffect ~= nil then doSendMagicEffect( getThingPos( cid ), args.endEffect ); end

 return TRUE
end
 
	